package modelo.datos;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;


@Entity
@Table(name="areaprofesional",schema="public")
@PrimaryKeyJoinColumn(name="codigo")
public class areaprofesional {

	@Id
	@Column(name="codigo")
	private String codarea;
	@Column(name="nombre")
	private String nomarea;
	
	@OneToMany(cascade= CascadeType.ALL)
	@JoinColumn(name="codareaprofesional")
	 private List<aviso>ListaAvisos;
	 

public areaprofesional() {
	super();
}

public areaprofesional(String codarea,String nomarea )
{
	this.codarea=codarea;
	this.nomarea=nomarea;
}

public String getCodarea() {
	return codarea;
}

public void setCodarea(String codarea) {
	this.codarea = codarea;
}

public String getNomarea() {
	return nomarea;
}

public void setNomarea(String nomarea) {
	this.nomarea = nomarea;
}


}

